Access to hourly and daily weather forecasts with the use of Dark Sky API.
getWeatherForecast(apiKey, lat = NA, lon = NA, city = NA, raw=FALSE)
The function getWeatherForecast()
returns list of three datasets.
now and by.hour datasets contains predictions. For each timepoint following information are collected:
time, summary, icon, precipIntensity, precipProbability, temperature, apparentTemperature, dewPoint, humidity, windSpeed, windBearing, visibility, cloudCover, pressure, ozone, temperatureCelsius, apparentTemperatureCelsius
Daily predictions (by.day component) contain following information:
time, summary, icon, sunriseTime, sunsetTime, moonPhase, precipIntensity, precipIntensityMax, precipProbability, temperatureMin, temperatureMinTime, temperatureMax, temperatureMaxTime, apparentTemperatureMin, apparentTemperatureMinTime, apparentTemperatureMax, apparentTemperatureMaxTime, dewPoint, humidity, windSpeed, windBearing, visibility, cloudCover, pressure, ozone, precipIntensityMaxTime, precipType, temperatureMaxCelsius, temperatureMinCelsius, apparentTemperatureMaxCelsius, apparentTemperatureMinCelsius
You need to have Dark Sky apiKey in order to access weather forecasts. See here: https://developer.forecast.io/ hor more details.
The latitude coordinate for which prediction has to be made.
The longitude coordinate for which prediction has to be made.
Instead of lat and lon you may specify name of the city for which prediction has to be made.
If TRUE then no parsing is done. The function getWeatherForecast() just download an forecast and returns it as a list.
Przemyslaw Biecek
The Dark Sky API for weather forecasts is described as https://developer.forecast.io/